<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<script src="jquery-1.10.2.min.js"></script>
		<title></title>
		<script>
			function test() {
				$.ajax({
					type: "POST",
					//crossDomain: true,
			/*		 headers: {
					   'Access-Control-Allow-Origin': 'http://localhost:8080/wx/hello/restOther'
					   },*/
					url: "http://localhost:8080/wx/hello/restOther",
					//contentType: "application/json",
					 contentType: 'application/json;charset=utf-8',
					//jsonpCallback: "jsonpcallback",
　　　　　　　　　　　data: '{"name":"测试资源","sub_button":[{"id":"2","key":"A0001","name":"事件测试","type":"click"},{"id":"2","key":"rselfmenu_1_0","name":"扫描测试","type":"pic_sysphoto"}]}',
					//data:{name:'nameTest'},
					dataType: "json",
					success: function(message) {

					},
					error: function(message) {

					}
				});

			}
			
			function test2() {
				$.ajax({
					type: "POST",
					//crossDomain: true,
					url: "http://localhost:8080/wx/hello/restOther2",
					//contentType: "application/json",
					//contentType: 'text/html;charset=utf-8',
					//jsonpCallback: "jsonpcallback",
　　　　　　　　　　　data: {name:'Name123'},
					dataType: "json",
					success: function(message) {

					},
					error: function(message) {

					}
				});

			}
		</script>
	</head>

	<body>
		
		<button onclick="test()">提交数据</button>

	</body>

</html>